package ma.moliere.transverse.utils;

import ma.moliere.persistance.oe.Absence;
import ma.moliere.transverse.vo.AbsenceAffiche;

public final class AbscenceUtil {
	/**
	 * 
	 * Constructeur par defaut.
	 */
	public AbscenceUtil() {

	}

	public static AbsenceAffiche copieOeVersVo(final Absence source) {
		if (source == null) {
			return null;
		}
		AbsenceAffiche destination = new AbsenceAffiche();
		destination.setAnneescolaire(source.getAnneescolaire());
		destination.setDatedebutabsence(source.getDatedebutabsence());
		destination.setDatedeclaration(source.getDatedeclaration());
		destination.setDatefinabsence(source.getDatefinabsence());
		destination.setDeclarepar(source.getDeclarepar());
		destination.setId(source.getId());
		destination.setLienparente(source.getLienparente());
		destination.setMatricule(source.getMatricule());
		destination.setMotifabsence(source.getMotifabsence());
		destination.setNom(source.getNom());
		destination.setPrenom(source.getPrenom());
		destination.setTel(source.getTel());
		return destination;
	}

	public static Absence copieVoVersOe(final AbsenceAffiche source) {
		if (source == null) {
			return null;
		}
		Absence destination = new Absence();
		destination.setAnneescolaire(source.getAnneescolaire());
		destination.setDatedebutabsence(source.getDatedebutabsence());
		destination.setDatedeclaration(source.getDatedeclaration());
		destination.setDatefinabsence(source.getDatefinabsence());
		destination.setDeclarepar(source.getDeclarepar());
		destination.setId(source.getId());
		destination.setLienparente(source.getLienparente());
		destination.setMatricule(source.getMatricule());
		destination.setMotifabsence(source.getMotifabsence());
		destination.setNom(source.getNom());
		destination.setPrenom(source.getPrenom());
		destination.setTel(source.getTel());
		return destination;
	}

}
